<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%>
<%@ page import="javax.portlet.*"%>
<%@ page import="java.util.*"%>
<%@ page import="com.x4ee.soa.portal.framework.tools.ConfigUtils"%>

<%@ page import="cn.com.chinasoa.archive.portlet.*"%>
<%@ page import="cn.com.chinasoa.archive.portlet.model.*"%>
<%@ page import="cn.com.chinasoa.archive.runtime.*"%>
<%@ page import="cn.com.chinasoa.archive.runtime.util.*"%>
<%String contextPath = request.getContextPath();%>
<portlet:defineObjects />
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr class="th">
    <th>标题</th>
    <th>文件名</th>
    <th>上传者</th>
	<th>日期</th>    
    <th>下载</th>
  </tr>
  <%Object archiveModelMapObj = renderRequest.getPortletSession().getAttribute(ArchiveUploadHelper.ARCHIVE_MODEL_MAP);
  if((archiveModelMapObj!=null)&&(archiveModelMapObj instanceof Map)){
	Map archiveModelMap = (Map)archiveModelMapObj;
	Set nameSet = archiveModelMap.keySet();
  	for(Iterator nIt = nameSet.iterator();nIt.hasNext();){
		String keyName = (String)nIt.next();
		Archive tArchive = (Archive)archiveModelMap.get(keyName);
  %>
    <tr class="tr-light">
	  <td><%=tArchive.getTitle()%></td>
	  <td><%=tArchive.getName()%></td>
	  <td><%=tArchive.getUser()%></td>
	  <td><%=CalendarUtil.getTime(tArchive.getCalendar())%></td>	  
	  <td><a href='<portlet:actionURL><portlet:param name="frameworkUri" value="downloadAction"/><portlet:param name="nodeName" value="<%=tArchive.getNodeName()%>"/></portlet:actionURL>'>下载</a></td>
    </tr>
  <%}}%>
</table>
<table>
    <tr class="tr-light">
	  <td><a href="<portlet:renderURL portletMode="EDIT"><portlet:param name="frameworkUri" value="archiveCreate"/></portlet:renderURL>">添加</a>
	  <a href="<portlet:renderURL portletMode="HELP"><portlet:param name="frameworkUri" value="HelpIndex"/></portlet:renderURL>">管理</a></td>
	  <td></td>
	  <td></td>
	  <td></td>
	</tr>
</table>	
